package com.sun.j2ee.blueprints.servicelocator.web;

import com.sun.j2ee.blueprints.servicelocator.ServiceLocatorException;

public aspect SingletonAspect issingleton(){

	private static ServiceLocator ServiceLocator.instance = createInstance();

	public static ServiceLocator ServiceLocator.getInstance() {
		return ServiceLocator.instance;
	};

	private static ServiceLocator createInstance() {
		try {
			return new ServiceLocator();
		} catch (final ServiceLocatorException se) {
			System.err.println(se);
			se.printStackTrace(System.err);
			return null;
		}
	}
}
